import { useIntl } from '@umijs/max';
import React from 'react';
import styles from '../index.less';

type IProps = {
  stationParams?: {
    currentStationSoh: number;
    totalCycleCount: number;
  };
};
const StationParams: React.FC<IProps> = (props) => {
  const { stationParams } = props;
  const intl = useIntl();
  return (
    <div className={styles.stationParamsContent}>
      <div className={styles.stationCard}>
        <div className={styles.stationCardImg}></div>
        <div>
          <div>{intl.formatMessage({ id: 'batteryVoltage.cycle.station' })}</div>
          <div className={styles.stationParamsText}>{stationParams?.currentStationSoh}%</div>
        </div>
      </div>
      <div className={styles.cycleCard}>
        <div className={styles.cycleCardImg}></div>
        <div>
          <div>{intl.formatMessage({ id: 'batteryVoltage.cycle.cycleTimes' })}</div>
          <div className={styles.stationParamsText}>{stationParams?.totalCycleCount}</div>
        </div>
      </div>
    </div>
  );
};

export default StationParams;
